const brandCloudObj = uniCloud.importObject("kt-mall-brand")

const brand = {
	state:{
		brandData:{
			noBrandData:false
		}
	},
	mutations:{
		SET_BRAND(state,value){
			state.brandData = value
		}
	},
	actions:{
		async getBrandData(context){
			let res =await brandCloudObj.get();
			if(!res.data.length){
				context.commit("SET_BRAND",{noBrandData:true})
				return;
			};
			context.commit("SET_BRAND",res.data[0])
		}
	}
}

export default brand